
import * as R from 'ramda'

const Debug = true;
const colorLog = (color: string) => (...params: any[]) => {
    if (!Debug) {
        return
    }
    console.log('%c%s', `color:${color};`, '[Engine]:', ...params);
}

const infoLog = colorLog('#0000ff');
const warnLog = colorLog('#ff0000');

const errorID = R.curry(function (errorId:number,msg:any,...params:any[]){
    infoLog(`errorId:${errorId}:`);
    warnLog('msg:', msg,...params);
});

export {
    infoLog, warnLog,
    errorID
}
